package com.sailfish.springbootdemo.controller.db4;

import com.sailfish.springbootdemo.pojo.Result;
import com.sailfish.springbootdemo.service.db4.LoginRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/loginRecord")
public class LoginRecordController {

    @Autowired
    private LoginRecordService loginRecordService;

    @PostMapping("/getAllLoginRecord")
    public Result getAllLoginRecord(String loginResult, Integer page, Integer pageSize){
        return loginRecordService.getAllLoginRecord(loginResult, page, pageSize);
    }
}
